#pragma once
#include "Entity.h"
#include "Part.h"
class CShip :
	public CEntity
{
private:

//Basic Stats
int m_nStat_Turning;
int m_nStat_Mass;
int m_nStat_FuelConsumption;
int m_nStat_HullPointz;
int m_nStat_SensorPackage;
int m_nStat_Thrusters;

int m_nHP;

//This will be used to set one of the special abilites
enum SHIP_SET_SPECIAL{S_TELEPORT=1,S_AFTERBUNER=2,S_TIME_REWIND=4,S_LAZER=8,S_SOLAR_SHIELDING=16,S_PIRATING=32,S_INVULSHIELD=64};
unsigned int m_unSpecialbit;

//the Part to make up the ship's stats. Parts[0]= Nose, Parts[1]= Hull, Parts[2]=Engine
	CPart m_cParts[3];

public:
	CShip(void);
	~CShip(void);
	
	//Mutators
	int Get_Stat_Turning(void)			{return m_nStat_Turning;};
	int Get_Stat_Mass(void)				{return m_nStat_Mass;};
	int Get_Stat_FuelConsumption(void)	{return m_nStat_FuelConsumption;};
	int Get_Stat_HullPointz(void)		{return m_nStat_HullPointz;};
	int Get_Stat_SensorPackage(void)	{return m_nStat_SensorPackage;;};
	int Get_Stat_Thrusters(void)		{return m_nStat_Thrusters;};
	int Get_HP(void)					{return m_nHP;};

	void Set_Stat_Turning (int turning)			{m_nStat_Turning=turning;};
	void Set_Stat_Mass	(int mass)				{m_nStat_Mass=mass;};
	void Set_Stat_FuelConsumption (int Fuel)	{m_nStat_FuelConsumption=Fuel;};
	void Set_Stat_HullPointz (int HP)			{m_nStat_HullPointz=HP;};
	void Set_Stat_SensorPackage	(int SensorPack){m_nStat_SensorPackage=SensorPack;};
	void Set_Stat_Thrusters	(int thrusters)		{m_nStat_Thrusters=thrusters;};
	void Set_HP(int HP)							{m_nHP=HP;};

	unsigned int Get_Special (void) {return m_unSpecialbit;};
	
	//Ok this function uses bit manipulation to turn bits on and off. Pass to to turn it on, and the Enum;
	void Set_Special(bool OnOff, unsigned int ability);
	
	//clears all bit feilds
	void Zero_Special(void)			{m_unSpecialbit=0;};

	void Set_Part(unsigned int unShip_Title, unsigned int unShip_Special, unsigned int unShip_Part_type, int nStat_Turning=0,int nStat_Mass=0,int nStat_FuelConsumption=0,
			int nStat_HullPointz=0,	int nStat_SensorPackage=0, int nStat_Thrusters=0, HTexture unShip_Part_Image=HTexture());
	//use the Part to create stats for the ship
	bool CalcutateStats (void);

	void DamageShip(int namount=1);

	CPart Get_Part(unsigned int Part_Type);
};

